home *** CD-ROM | disk | FTP | other *** search
/ Aminet 51 / Aminet 51 (2002)(GTI - Schatztruhe)[!][Oct 2002].iso / Aminet / util / cdity / DepthMenu.lha / DepthMenu / Install < prev    next >
Encoding:
Text File  |  2002-07-09  |  6.9 KB  |  184 lines

  1. ;
  2. ; DepthMenu install script
  3. ; Copyright © 2001-2002 Arkadiusz [Yak] Wahlig
  4. ;
  5. ; $VER: DepthMenu_Install 1.18 (08.07.2002) Arkadiusz [Yak] Wahlig
  6. ;
  7.  
  8. (set #app-ver "2.36")
  9. (set #copyright "Copyright © 2001-2002 Arkadiusz [Yak] Wahlig")
  10.  
  11. (IF (= @LANGUAGE "polski")
  12. (
  13.  (set #hello (cat "\n\n\n" @app-name " " #app-ver "\n" #copyright "\n\n\n\nTen skrypt zainstaluje program DepthMenu\nna twoim dysku twardym.") )
  14.  
  15.  (set #dir-question1 "Gdzie mam zainstalowaê program?")
  16.  (set #dir-question2 "Zostanie tam stworzony katalog 'DepthMenu'.")
  17.  (set #dir-help "Wybierz katalog, w którym ma byê zainstalowany program. W katalogu, który wybierzesz stworzony zostanie podkatalog 'DepthMenu' a do niego zostanâ skopiowane wszystkie potrzebne pliki.")
  18.  
  19.  (set #languages-question "Które katalogi jëzykowe chcesz zainstalowaê?")
  20.  (set #languages-help "Program posiada wbudowany jëzyk angielski. Jeôli chcesz aby uûywaî innego jëzyka, zaznacz go na tym ekranie a póúniej ustaw jëzyk go jako preferowany w systemowych ustawieniach Locale.")
  21.  
  22.  (set #docs-question "Które wersje dokumentacji chcesz zainstalowaê?")
  23.  (set #docs-help "Program posiada róûne wersje jëzykowe dokumentacji. Na tym ekranie moûesz wybraê, które z nich majâ byê zainstalowane.")
  24.  
  25.  (set #wbstartup-question "\n\nCzy chcesz uruchamiaê program przy starcie systemu?")
  26.  (set #wbstartup-positive "Tak (zalecane)")
  27.  (set #wbstartup-negative "Nie")
  28.  (set #wbstartup-help "Jeôli wybierzesz 'Tak', DepthMenu bëdzie uruchamiany przy kaûdym starcie systemu. Z moûliwoôci tej moûna w kaûdej chwili zrezygnowaê poprzez poprzez wyrzucenie lub przeniesienie pliku START_DepthMenu.info z katalogu WBStartup.\n\nJeôli wybierzesz 'Nie' plik START_DepthMenu.info bëdzie skopiowany do katalogu z programem. Jeôli wiëc zdecydujesz sië na uruchamianie przy starcie systemu to musisz tylko przenieôê jen plik do katalogu WBStartup.")
  29.  
  30.  (set #start-question "\n\nCzy chcesz uruchomiê program teraz?")
  31.  (set #start-help "Jeôli wybierzesz 'Tak', DepthMenu bëdzie uruchomiony i gotowy do pracy w tej chwili.")
  32.  
  33.  (set #bye-install "\n\nInstalacja zakoïczona pomyôlnie!")
  34.  (set #bye-update "\n\nUpdate zakoïczony pomyôlnie!")
  35.  (set #bye-thanks "\n\nDziëkujë za zainstalowanie programu.")
  36. ))
  37. (IF (= @LANGUAGE "english")
  38. (
  39.  (set #hello (cat "\n\n\n" @app-name " " #app-ver "\n" #copyright "\n\n\n\nThis script will install DepthMenu program\non your hard-disk.") )
  40.  
  41.  (set #dir-question1 "Where should I install the program?")
  42.  (set #dir-question2 "A directory called 'DepthMenu' will be created there.")
  43.  (set #dir-help "Choose a directory, where the DepthMenu program should be installed. The installer will create a directory called 'DepthMenu', where all needed files will be copied.")
  44.  
  45.  (set #languages-question "Which catalogs should be installed?")
  46.  (set #languages-help "DepthMenu's built-in language in english. If you want it to use some other languale you got to choose it now and set it as prefered in your Locale preferences program after installation.")
  47.  
  48.  (set #docs-question "Which documentations should be installed?")
  49.  (set #docs-help "Program documentations are available in different languages. On this screen you can choose, which of them should be installed.")
  50.  
  51.  (set #wbstartup-question "\n\nDo you want to start DepthMenu at system startup?")
  52.  (set #wbstartup-positive "Yes (recomended)")
  53.  (set #wbstartup-negative "No")
  54.  (set #wbstartup-help "If you choose 'Yes', DepthMenu will be started at every system startup. You can always disable it by removing file START_DepthMenu.info from SYS:WBStartup drawer.\n\nIf you choose 'No' you can always enable this feature by placing file START_DepthMenu.info in SYS:WBStartup drawer. In this case you will find this file in DepthMenu's directory.")
  55.  
  56.  (set #start-question "\n\nDo you want to start DepthMenu now?")
  57.  (set #start-help "If you choose 'Yes', DepthMenu will be started and ready to work NOW.")
  58.  
  59.  (set #bye-install "\n\nInstallation successful finished!")
  60.  (set #bye-update "\n\nUpdate successful finished!")
  61.  (set #bye-thanks "\n\nThank you for installing DepthMenu.")
  62. ))
  63.  
  64. ; powitanie
  65. (complete 0)
  66. (message #hello)
  67.  
  68. ; gdzie instalowac?
  69. (set #_dir
  70.  (askdir
  71.   (prompt (cat #dir-question1 " ") #dir-question2)
  72.   (help #dir-help)
  73.   (default "Work:")
  74.   (disk)
  75.  )
  76. )
  77.  
  78. ; tworzenie katalogu, rozpoznanie czy jest stara wersja (update)
  79. (complete 10)
  80. (set #_instdir (tackon #_dir "DepthMenu"))
  81. (set #_update 0)
  82. (if (exists #_instdir) (set #_update 1) (makedir #_instdir) )
  83.  
  84. ; kopiujemy ikone katalogu
  85. (copyfiles
  86.  (source "/DepthMenu.info")
  87.  (dest #_dir)
  88. )
  89.  
  90. ; kopiujemy pliki lokalizacyjne (z pytaniem ktore)
  91. (complete 20)
  92. (copyfiles
  93.  (source "Catalogs")
  94.  (dest (tackon #_instdir "Catalogs"))
  95.  (infos)
  96.  (pattern "~(#?.cd)")
  97.  (prompt #languages-question)
  98.  (help #languages-help)
  99.  (confirm)
  100. )
  101. (copyfiles (source "Catalogs") (dest (tackon #_instdir "Catalogs")) (pattern "#?.cd#?"))
  102. (copyfiles (source "Catalogs.info") (dest #_instdir))
  103.  
  104. ; kopiujemy dokumentacje (z pytaniem ktore)
  105. (complete 30)
  106. (copyfiles
  107.  (source "Docs")
  108.  (dest (tackon #_instdir "Docs"))
  109.  (infos)
  110.  (all)
  111.  (prompt #docs-question)
  112.  (help #docs-help)
  113.  (confirm)
  114. )
  115. (copyfiles (source "Docs.info") (dest #_instdir))
  116.  
  117. ; kopiujemy program (bez ikony)
  118. (complete 40)
  119. (copyfiles (source "DepthMenu") (dest #_instdir))
  120.  
  121. ; kopiujemy katalog modulow
  122. (complete 50)
  123. (copyfiles (source "Modules") (dest (tackon #_instdir "Modules")) (all))
  124. (copyfiles (source "Modules.info") (dest #_instdir))
  125.  
  126. ; ustawiamy defaulttool ikonki START_DepthMenu na wczesniej wybrana lokacje programu
  127. (complete 60)
  128. (tooltype (dest "InstallData/START_DepthMenu") (setdefaulttool (tackon #_instdir "DepthMenu")))
  129.  
  130. ; usuwamy bardzo stara wersje (kiedys DepthMenu bylo umieszczane w WBStartup)
  131. (complete 70)
  132. (if(exists "SYS:WBStartup/DepthMenu")
  133. (
  134.  (delete "SYS:WBStartup/DepthMenu")
  135.  (delete "SYS:WBStartup/DepthMenu.info")
  136. ))
  137.  
  138. ; tu wchodzimy jesli instalujemy pierwszy raz
  139. (if (= #_update 0)
  140. (
  141.  
  142. ; nie powinno tam tego byc, ale noz widelec
  143. (complete 75)
  144. (if(exists "SYS:WBStartup/START_DepthMenu.info")
  145. (
  146.  (delete "SYS:WBStartup/START_DepthMenu.info")
  147. ))
  148.  
  149. ; kopiujemy ikone programu
  150. (complete 80)
  151. (copyfiles (source "DepthMenu.info") (dest #_instdir))
  152.  
  153. ; pytamy sie o odpalanie z WBStartup i jesli tak to kopiujemy ikone
  154. ; jesli nie to kopiujemy ja do katalogu z programem (z plikiem readme)
  155. (complete 85)
  156. (if(askbool
  157.  (prompt #wbstartup-question)
  158.  (choices #wbstartup-positive #wbstartup-negative)
  159.  (help #wbstartup-help)
  160.  )
  161. (copyfiles (source "InstallData/START_DepthMenu.info") (dest "SYS:WBStartup"))
  162. (copyfiles (source "InstallData") (dest #_instdir) (infos) (pattern "START_DepthMenu#?"))
  163. )
  164.  
  165. ))
  166.  
  167. ; pytamy sie o odpalenie programu teraz i odpalamy jesli tak
  168. (complete 90)
  169. (if(askbool
  170.  (prompt #start-question)
  171.  (help #start-help)
  172.  )
  173. (
  174.  (run "InstallData/BreakDM")
  175.  (run (cat "Run <>NIL: " (tackon #_instdir "DepthMenu")))
  176. ))
  177.  
  178. ; kilka slow na pozegnanie z installerem
  179. (complete 100)
  180. (if (= #_update 0)
  181.  (exit (cat #bye-install #bye-thanks) (quiet) )
  182.  (exit (cat #bye-update #bye-thanks) (quiet) )
  183. )
  184.